{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    " 第四步 重新调整弱学习器数目"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1、导入工具包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from xgboost import XGBClassifier\n",
    "import xgboost as xgb\n",
    "\n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "\n",
    "from sklearn.metrics import log_loss\n",
    "\n",
    "from matplotlib import pyplot\n",
    "import seaborn as sns\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "dpath = './data/'\n",
    "train=pd.read_csv(dpath+'RentListingInquries_FE_train.csv')\n",
    "test=pd.read_csv(dpath+'RentListingInquries_FE_test.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_train = train['interest_level']\n",
    "X_train = train.drop(['interest_level'],axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# prepare cross validation\n",
    "kfold = StratifiedKFold(n_splits=5, shuffle=True, random_state=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "def modelfit(alg,X_train,y_train,userTrainCV=True,cv_folds=None,early_stopping_rounds=100):\n",
    "    if userTrainCV:\n",
    "        xgb_param=alg.get_xgb_params()\n",
    "        xgb_param['num_class']=3\n",
    "        xgtrain = xgb.DMatrix(X_train, label = y_train)\n",
    "        \n",
    "        cvresult = xgb.cv(xgb_param, xgtrain, num_boost_round=alg.get_params()['n_estimators'], folds =cv_folds,\n",
    "                         metrics='mlogloss', early_stopping_rounds=early_stopping_rounds)\n",
    "        \n",
    "        n_estimators = cvresult.shape[0]\n",
    "        alg.set_params(n_estimators = n_estimators)\n",
    "        print cvresult\n",
    "        \n",
    "        cvresult.to_csv('my_pred_220.csv', index_label = 'n_estimators')\n",
    "        # plot\n",
    "        test_means = cvresult['test-mlogloss-mean']\n",
    "        test_stds = cvresult['test-mlogloss-std'] \n",
    "        \n",
    "        train_means = cvresult['train-mlogloss-mean']\n",
    "        train_stds = cvresult['train-mlogloss-std']\n",
    "        x_axis = range(0, n_estimators)\n",
    "        pyplot.errorbar(x_axis, test_means, yerr=test_stds ,label='Test')\n",
    "        pyplot.errorbar(x_axis, train_means, yerr=train_stds ,label='Train')\n",
    "        pyplot.title(\"XGBoost n_estimators vs Log Loss\")\n",
    "        pyplot.xlabel( 'n_estimators' )\n",
    "        pyplot.ylabel( 'Log Loss' )\n",
    "        pyplot.savefig( 'n_estimators_220.png' )\n",
    "    #Fit the algorithm on the data\n",
    "    alg.fit(X_train, y_train, eval_metric='mlogloss')\n",
    "    #Predict training set:\n",
    "    train_predprob = alg.predict_proba(X_train)\n",
    "    logloss = log_loss(y_train, train_predprob)\n",
    "    #Print model report:\n",
    "    print (\"logloss of train :\" )\n",
    "    print logloss\n",
    "    "
   ]
  },
  {
   "cell_type": "raw",
   "metadata": {},
   "source": [
    "2、重新执行，n_estimators最佳参数还是220"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "     test-mlogloss-mean  test-mlogloss-std  train-mlogloss-mean  \\\n",
      "0              1.039976           0.000231             1.039239   \n",
      "1              0.990323           0.000217             0.989090   \n",
      "2              0.947896           0.000637             0.946200   \n",
      "3              0.911813           0.000609             0.909667   \n",
      "4              0.880946           0.000992             0.878194   \n",
      "5              0.853610           0.001001             0.850433   \n",
      "6              0.829860           0.001219             0.826079   \n",
      "7              0.808824           0.001123             0.804426   \n",
      "8              0.790475           0.000918             0.785470   \n",
      "9              0.774209           0.000996             0.768680   \n",
      "10             0.759671           0.001017             0.753572   \n",
      "11             0.746792           0.001187             0.740123   \n",
      "12             0.735339           0.000987             0.728260   \n",
      "13             0.724982           0.001070             0.717514   \n",
      "14             0.715801           0.001066             0.707864   \n",
      "15             0.707553           0.001199             0.699175   \n",
      "16             0.700479           0.001254             0.691404   \n",
      "17             0.694008           0.001351             0.684411   \n",
      "18             0.688099           0.001512             0.677868   \n",
      "19             0.682698           0.001620             0.671888   \n",
      "20             0.677849           0.001617             0.666585   \n",
      "21             0.673526           0.001748             0.661880   \n",
      "22             0.669550           0.001527             0.657450   \n",
      "23             0.666015           0.001465             0.653523   \n",
      "24             0.662327           0.001484             0.649358   \n",
      "25             0.659210           0.001538             0.645822   \n",
      "26             0.656408           0.001688             0.642288   \n",
      "27             0.653915           0.001887             0.639116   \n",
      "28             0.651397           0.002002             0.636151   \n",
      "29             0.649014           0.002129             0.633279   \n",
      "..                  ...                ...                  ...   \n",
      "190            0.593385           0.002921             0.514043   \n",
      "191            0.593402           0.002975             0.513681   \n",
      "192            0.593409           0.002868             0.513260   \n",
      "193            0.593401           0.002847             0.512898   \n",
      "194            0.593344           0.002827             0.512509   \n",
      "195            0.593228           0.002866             0.512111   \n",
      "196            0.593211           0.002918             0.511791   \n",
      "197            0.593139           0.002976             0.511403   \n",
      "198            0.593167           0.002953             0.511019   \n",
      "199            0.593155           0.002957             0.510733   \n",
      "200            0.593181           0.002977             0.510414   \n",
      "201            0.593244           0.002977             0.510128   \n",
      "202            0.593196           0.003009             0.509775   \n",
      "203            0.593173           0.003051             0.509402   \n",
      "204            0.593128           0.002996             0.509001   \n",
      "205            0.593098           0.002915             0.508657   \n",
      "206            0.593023           0.002876             0.508296   \n",
      "207            0.592963           0.002850             0.507961   \n",
      "208            0.592929           0.002793             0.507615   \n",
      "209            0.592912           0.002787             0.507226   \n",
      "210            0.592833           0.002735             0.506814   \n",
      "211            0.592794           0.002709             0.506429   \n",
      "212            0.592768           0.002703             0.506083   \n",
      "213            0.592624           0.002728             0.505598   \n",
      "214            0.592513           0.002694             0.505239   \n",
      "215            0.592500           0.002685             0.504892   \n",
      "216            0.592451           0.002713             0.504508   \n",
      "217            0.592454           0.002708             0.504236   \n",
      "218            0.592442           0.002607             0.503869   \n",
      "219            0.592392           0.002543             0.503461   \n",
      "\n",
      "     train-mlogloss-std  \n",
      "0              0.000377  \n",
      "1              0.000395  \n",
      "2              0.000252  \n",
      "3              0.000124  \n",
      "4              0.000463  \n",
      "5              0.000500  \n",
      "6              0.000517  \n",
      "7              0.000191  \n",
      "8              0.000416  \n",
      "9              0.000441  \n",
      "10             0.000646  \n",
      "11             0.000728  \n",
      "12             0.000784  \n",
      "13             0.000792  \n",
      "14             0.000904  \n",
      "15             0.001030  \n",
      "16             0.001033  \n",
      "17             0.001312  \n",
      "18             0.001212  \n",
      "19             0.001089  \n",
      "20             0.001051  \n",
      "21             0.000994  \n",
      "22             0.001151  \n",
      "23             0.001272  \n",
      "24             0.001411  \n",
      "25             0.001411  \n",
      "26             0.001159  \n",
      "27             0.001101  \n",
      "28             0.000917  \n",
      "29             0.000957  \n",
      "..                  ...  \n",
      "190            0.000909  \n",
      "191            0.000866  \n",
      "192            0.000924  \n",
      "193            0.000869  \n",
      "194            0.000808  \n",
      "195            0.000780  \n",
      "196            0.000779  \n",
      "197            0.000718  \n",
      "198            0.000670  \n",
      "199            0.000636  \n",
      "200            0.000622  \n",
      "201            0.000647  \n",
      "202            0.000653  \n",
      "203            0.000659  \n",
      "204            0.000630  \n",
      "205            0.000706  \n",
      "206            0.000704  \n",
      "207            0.000738  \n",
      "208            0.000800  \n",
      "209            0.000713  \n",
      "210            0.000668  \n",
      "211            0.000635  \n",
      "212            0.000645  \n",
      "213            0.000636  \n",
      "214            0.000784  \n",
      "215            0.000828  \n",
      "216            0.000822  \n",
      "217            0.000831  \n",
      "218            0.000827  \n",
      "219            0.000912  \n",
      "\n",
      "[220 rows x 4 columns]\n",
      "logloss of train :\n",
      "0.5220845701932315\n"
     ]
    },
    {
     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3N0JgbLF3Z/20LPos1nPv8jM/go8TrhiWa6r/70a+IO7b3P3HuBHQG/35mlCT50QgqcDuNHM3kroY0fkZSuIDvGk4HRm3U4DuZqPEkCjuy/oP8HdP2BmJwJvAp6IOoQb7HNm+j1/BkhFPYl+Eni1u++KmpVKcywnV1/8vTo82o/goZPHE4A3EHr9vQp4/SDqFNkvbSlIQfJwkZRVZvY26LvY+iui23Pc/VF3/yywndA3fjNQ9TKeshpoBXab2UTCRY56ZS/7UeA0M6uPrnl8KfDH/guLtnRqPFwz+aOEi+CIvGzaUpBC9k7g22b2GaCIsF/gSeA/zWwe4Vf7/dG4tcDVUVPTlw72idz9STN7nNCctJLQRNXrBuD/zGyTu/+NmX0aeCB6/nvcPdf1LaqAX5pZaTTfxw62JpFcdEiqiIj0UfORiIj0UfORjHlmdj3h6lnZvuHuN8dRj8hIpuYjERHpo+YjERHpo1AQEZE+CgUREemjUBARkT7/H4nRIqP9YtMNAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x15080c50>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#调整max_depth和min_child_weight之后再次调整n_estimators(5,1)\n",
    "xgb4 = XGBClassifier(\n",
    "        learning_rate =0.1,\n",
    "        n_estimators=220,  #数值大没关系，cv会自动返回合适的n_estimators\n",
    "        max_depth=5,\n",
    "        min_child_weight=1,\n",
    "        gamma=0,\n",
    "        subsample=0.3,\n",
    "        colsample_bytree=0.8,\n",
    "        colsample_bylevel=0.7,\n",
    "        objective= 'multi:softprob',\n",
    "        seed=3)\n",
    "\n",
    "modelfit(xgb4, X_train, y_train, cv_folds = kfold)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.14"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
